/*
 * setupblog.h
 *
 *  Created on: ?
 *      Author: ?
 */

#ifndef SETUPBLOG_H
#define SETUPBLOG_H

#include <QSvgWidget>
#include <QStyle>

#include "ui_setupblog.h"
#include "WPData.h"
#include "wpcustomviewbasicdata.h"

class QFrame;
class BlogView;

class SetupBlog : public QFrame, public WPCustomViewBasicData
{

    Q_OBJECT

public:
    SetupBlog(BlogView *aBlogView, QWidget *parent = 0);
    ~SetupBlog();

    void NewBlog();
    void EditBlog(WPDataBlog* aBlog);
    
signals:
    void ErrorNote(const QString &message);

public slots:
    void Save();
    void setFocus();
    
public:
    Ui::SetupBlogClass ui;

protected:
    void resizeEvent(QResizeEvent *e);
    
private:
    void SetCancel();
    void SetLogoVisibility();

private slots:
    void Cancel();

private:
    BlogView* iBlogView;
    
    bool iEditingBlog;
    WPDataBlog* iEditedBlog;
    bool iCancelSet;
    QSvgWidget *iSvg;
    bool iKeyPressed;
};

#endif // SETUPBLOG_H
